package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IAddPutForwardActivityModel;
import com.wgts.wgts.mvp.model.ISendSMSCodeModel;
import com.wgts.wgts.mvp.model.imp.AddPutForwardActivityModel;
import com.wgts.wgts.mvp.model.imp.SendSMSCodeModel;
import com.wgts.wgts.mvp.presenter.IAddPutForwardActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.AddPutForwardActivityPresenter;
import com.wgts.wgts.mvp.view.IAddPutForwardActivityView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.CountDownTime;

import dagger.Module;
import dagger.Provides;

@Module
public class AddPutForwardActivityMoudule {

    private IAddPutForwardActivityView view;

    public AddPutForwardActivityMoudule(IAddPutForwardActivityView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public IAddPutForwardActivityView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public IAddPutForwardActivityModel provideModel(NetService netService){
        return new AddPutForwardActivityModel(netService);
    }

    @Provides
    @ActivityScope
    public ISendSMSCodeModel provideSMSModel(NetService netService, CountDownTime countDownTime){
        return new SendSMSCodeModel(netService, countDownTime);
    }

    @Provides
    @ActivityScope
    public IAddPutForwardActivityPresenter providePresenter(IAddPutForwardActivityView view, IAddPutForwardActivityModel model, ISendSMSCodeModel SMSmodel){
        return new AddPutForwardActivityPresenter(model, view, SMSmodel);
    }
}
